<?php defined('LG_ADMIN') or die('Access Denied'); ?>
<?php

use Lg\View\Asset;
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title><?php echo get_option('system.sitename'); ?> | <?php echo __('系统登录') ?></title>                        
        <link rel="stylesheet" type="text/css" href="<?php echo root_url("/assets/admin-ui/css/font-awesome.min.css"); ?>" />
        <link rel="stylesheet" type="text/css" href="<?php echo root_url("/assets/admin-ui/css/simple-line-icons.css"); ?>" />
        <link rel="stylesheet" type="text/css" href="<?php echo root_url("/assets/admin-ui/css/simple-line-icons.css"); ?>" />
        <link rel="stylesheet" href="<?php echo root_url("/assets/admin-ui/css/style.css"); ?>" />               

        <link href="<?php echo root_url("/assets/flags/flags.css"); ?>" rel="stylesheet">
        <script src="<?php echo root_url('/assets/admin-ui/js/libs/jquery.min.js'); ?>"></script>
        <script src="<?php echo root_url('/assets/admin-ui/js/libs/tether.min.js'); ?>"></script>
        <script src="<?php echo root_url('/assets/admin-ui/js/libs/bootstrap.min.js'); ?>"></script>
        <script src="<?php echo root_url('/assets/admin-ui/js/libs/pace.min.js'); ?>"></script>
        <style>
            .flex-row {
                flex-direction: row !important;
            }
            .align-items-center {
            align-items: center !important; }
            .app{
                display: flex;
                flex-direction: column;
                min-height: 100vh;
            }
            .justify-content-center {
  justify-content: center !important; }
        </style>
        <?php Asset::render(Asset::HEAD); ?>
        <!--[if lt IE 9]>
        <script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body class="app flex-row align-items-center">

       <div class="container">
            <div class="row">
                <div class="col-md-8 m-x-auto pull-xs-none vamiddle">
                    <form action="" method="post">
                        <div class="card-group mb-0">
                            <div class="card p-a-2">
                                <div class="card-block">
                                    <h3>Control Panel</h3>
                                    <p class="text-muted">登录到您的帐户</p>
                                    <div class="input-group m-b-1">
                                        <span class="input-group-addon"><i class="icon-user"></i>
                                        </span>
                                        <input type="text" class="form-control" name="username" placeholder="Email" autofocus />
                                    </div>
                                    <div class="input-group m-b-2">
                                        <span class="input-group-addon"><i class="icon-lock"></i>
                                        </span>
                                        <input type="password" class="form-control" name="password" placeholder="Password">
                                    </div>
                                    <?php
                                    $messages = Lg\Http\Session::allFlash();
                                    foreach ($messages as $type => $message) {
                                        if ($type == 'error') {
                                            $type = 'danger';
                                        }
                                        ?>
                                        <div class="alert alert-<?php echo $type; ?>">                   
                                            <?php
                                            foreach ($message as $msg) {
                                                echo $msg, '<br/>';
                                            }
                                            ?>
                                        </div>
                                        <?php
                                    }
                                    ?>
                                    
                                    <div class="row">
                                       <div class="col-xs-6">
                                            <button type="submit" class="btn btn-primary px-2"><?php echo __('登录') ?></button>                                            
                                        </div>
                                        <div class="col-xs-6 text-xs-right">
                                            <button type="button" class="btn btn-link px-0">找回密码?</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="card card-inverse card-primary py-3 hidden-md-down" style="width:44%">
                                <div class="card-block text-xs-center">
                                    <div>
                                        <h1>H1CMS</h1>
                                        <p>免费开源的CMS系统,简单易用。</p>
                                        <a target="_blank" href="http://www.h1cms.com" class="btn btn-primary active m-t-1">立即获取</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <?php Asset::render(Asset::BODY_END); ?>       
        <?php Asset::render(Asset::DOM_LOAD); ?>
        <?php Asset::render(Asset::DOM_READY); ?>
    </body>
</html>
